using System.Collections.ObjectModel;

namespace AvalonAdmin.ViewModels
{
    public class MenuViewModel : ViewModelBase
    {
        public ObservableCollection<MenuItemViewModel> MenuItems { get; set; }

        public MenuViewModel()
        {
            MenuItems = new ObservableCollection<MenuItemViewModel>
            {
                new()
                {
                    MenuHeader = "系统管理",
                    Children = new ObservableCollection<MenuItemViewModel>
                    {
                        new() { MenuHeader = "用户管理", Key = MenuKeys.MenuKeyUser},
                    }
                },
                new()
                {
                    MenuHeader = "汽车基础设置",
                    Children = new ObservableCollection<MenuItemViewModel>
                    {
                        new() { MenuHeader = "区域管理", Key = MenuKeys.MenuKeyArea},
                        new() { MenuHeader = "国家管理", Key = MenuKeys.MenuKeyCountry},
                        new() { MenuHeader = "品牌管理", Key = MenuKeys.MenuKeyBrand},
                        new() { MenuHeader = "车系管理", Key = MenuKeys.MenuKeyVehicleSeries},
                        new() { MenuHeader = "车型管理", Key = MenuKeys.MenuKeyCarType},
                        new() { MenuHeader = "车型版本", Key = MenuKeys.MenuKeyCarTypeVersion},
                        new() { MenuHeader = "车辆配件类型", Key = MenuKeys.MenuKeyCarPartsType},
                    }
                },
                new()
                {
                    MenuHeader = "汽车配件",
                    Children = new ObservableCollection<MenuItemViewModel>
                    {
                        new() { MenuHeader = "配件类型", Key = MenuKeys.MenuKeyCarPartsType},
                        new() { MenuHeader = "配件管理", Key = MenuKeys.MenuKeyCarParts},
                        new() { MenuHeader = "车系配件类型", Key = MenuKeys.MenuKeyVehicleSeriesCarPartsType},
                    }
                },
                //new()
                //{
                //    MenuHeader = "规则管理",
                //    Children = new ObservableCollection<MenuItemViewModel>
                //    {
                //        new() { MenuHeader = "规则设定", Key = MenuKeys.MenuKeyRuleConfig},
                //    }
                //},
                //new()
                //{
                //    MenuHeader = "VIN码匹配",
                //    Children = new ObservableCollection<MenuItemViewModel>
                //    {
                //         new() { MenuHeader = "汽车VIN码", Key = MenuKeys.MenuKeyCarVin},
                //    }
                //},
                //new()
                //{
                //    MenuHeader = "代理设置",
                //    Children = new ObservableCollection<MenuItemViewModel>
                //    {
                //        new() { MenuHeader = "线路管理", Key = MenuKeys.MenuKeyRouteSetting},
                //        new() { MenuHeader = "代理中控", Key = MenuKeys.MenuKeyProxyCentralControl},
                //         new() { MenuHeader = "代理设置", Key = MenuKeys.MenuKeyAgentSetting },
                //    }
                //},
                new() { MenuHeader = "关于软件", Key = MenuKeys.MenuKeyAbout, IsSeparator = false },
            };
        }
    }

    public static class MenuKeys
    {
        public const string MenuKeyUser = "Sys.Views.UserPage";
        public const string MenuKeyArea = "CarType.Views.Area.Page_Area";
        public const string MenuKeyCountry = "CarType.Views.Country.Page_Country";
        public const string MenuKeyBrand = "CarType.Views.Brand.Page_Brand";
        public const string MenuKeyVehicleSeries = "CarType.Views.VehicleSeries.Page_VehicleSeries";
        public const string MenuKeyCarType = "CarType.Views.CarType.Page_CarType";
        public const string MenuKeyCarTypeVersion = "CarType.Views.CarTypeVersion.Page_CarTypeVersion";

        public const string MenuKeyCarParts = "CarParts.Views.CarParts.Page_CarParts";
        public const string MenuKeyCarPartsType = "CarParts.Views.CarPartsType.Page_CarPartsType";
        public const string MenuKeyVehicleSeriesCarPartsType = "CarParts.Views.VehicleSeriesCarPartsType.Page_VehicleSeriesCarPartsType";

        public const string MenuKeyRuleConfig = "Rule.Views.RuleConfig.Page_RuleConfig";
        public const string MenuKeyRuleMapping = "Rule.Views.RuleMapping.Page_RuleMapping";

        public const string MenuKeyCarVin = "CarVin.Views.Page_VIN";

        public const string MenuKeyProxyCentralControl = "ProxyCentralControl";
        public const string MenuKeyAgentSetting = "AgentSetting";
        public const string MenuKeyRouteSetting = "RouteSetting";

        public const string MenuKeyAbout = "About";
    }
}
